/*
 * BlockingQueue.cpp
 * Queue that sleeps calling thread when invoking take and waks up when
 * queue is not empty. It's to implement Producer-Consumer Pattern in
 *  Created on: 18/06/2011
 *      Author: wadi
 */


#ifndef CONDITIONVARIABLE_H_
#define CONDITIONVARIABLE_H_
#include "mutex.h"
#include <pthread.h>

class ConditionVariable
{
public:
  ConditionVariable();
  virtual
  ~ConditionVariable();
  void wait(Mutex& m);
  void notify();
private:
  pthread_cond_t  condition_variable;
};

#endif /* CONDITIONVARIABLE_H_ */
